home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
FONT_UTL
/
FNTCTL
/
FONAPP.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1995-03-04
|
2KB
|
64 lines
program FontApp;
{---------------------------------------------------------------------
Example application for the custom control Font (FntCtls.DLL) of
the SMWCC 2.0 Custom Control Pack
Copyright (C) by Sebastian Modersohn
Note: This code file isn't documented into detail. If you have
questions to *THIS* code file or want to know some details
please contact me via CompuServe, ID 100340,1474.
---------------------------------------------------------------------}
{$IFNDEF AUTOLOAD}
You HAVE to compile this program with the global defined symbol "AUTOLOAD" !
This demonstrates the autoloading feature of the import unit Font!
{$ENDIF}
{$R FontApp}
uses WinTypes, WinProcs, WinDos, OWindows, ODialogs, Strings,
{the interface unit (only for autoloading the DLL)
and its constant unit}
Font, FntCtlCo;
type
{main window: No object has to be initialized!;
this object is only necessary for the help-call}
PFontWindow = ^TFontWindow;
TFontWindow = object(TDlgWindow)
procedure Help(var Msg: TMessage);
virtual id_First + 998;
end;
{App that initializes the main window}
PFontApp = ^TFontApp;
TFontApp = object(TApplication)
procedure InitMainWindow; virtual;
end;
{ TFontWindow }
procedure TFontWindow.Help(var Msg: TMessage);
begin
WinHelp(HWindow, HelpFile, Help_Context, 100);
end;
{ TFontApp }
procedure TFontApp.InitMainWindow;
begin
MainWindow := New(PFontWindow, Init(nil, 'dlg_main'));
end;
var App: TFontApp;
begin
App.Init('Font Demo');
App.Run;
App.Done;
end.